package com.example.automanagement.service.serviceImpl;

import com.example.automanagement.entity.Alarm;
import com.example.automanagement.entity.HomeTableData;
import com.example.automanagement.entity.ToDo;
import com.example.automanagement.entity.Warning;
import com.example.automanagement.mapper.HomeDataMapper;
import com.example.automanagement.service.HomeDataService;
import com.example.automanagement.views.autoStatusNumber;
import com.example.automanagement.views.autoTypeNumber;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HomeDataServiceImpl implements HomeDataService {
    @Autowired
    private HomeDataMapper HomeMapper;
    @Override
    public List<HomeTableData> getHomeTableData(){
        return HomeMapper.getHomeTableData();
    }
    @Override
    public List<Alarm> getUserAlarm(String userId){
        return HomeMapper.getAlarmList(userId);
    }
    @Override
    public List<Warning> getUserWarning(String userId){
        return HomeMapper.getWarnList(userId);
    }
    @Override
    public List<ToDo> getUserTodoDone(String userId){
        return HomeMapper.getTodoDoneList(userId);
    }
    @Override
    public List<ToDo> getUserTodoUndone(String userId){
        return HomeMapper.getTodoUndoneList(userId);
    }
    @Override
    public int getTodoUndoneNumber(String userId){
        return HomeMapper.getTodoUndoneNumber(userId);
    };
    public List<autoStatusNumber> getAutoStatusNumber(){
        return HomeMapper.getAutoStatusNumber();
    };
    @Override
    public List<autoTypeNumber> getAutoTypeNumber(){
        return HomeMapper.getAutoTypeNumber();
    };
}
